﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintOutStorage.aspx.cs"
    Inherits="dzs.Web.Outstorage.PrintOutStorage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .aline_center
        {
            margin-left: auto;
            margin-right: auto;
            overflow: hidden;
        }
        body
        {
            font-size: 10pt;
        }
    </style>
    <script language="javascript" type="text/javascript">

        function printpage(myDiv) {

            //var newstr = document.all.item(myDiv).innerHTML; 
            var newstr = document.getElementById(myDiv).innerHTML;
            //alert(newstr);
            var oldstr = document.body.innerHTML;
            document.body.innerHTML = newstr;
            window.print();
            document.body.innerHTML = oldstr;
            return false;
        }
    </script>
    <%
        Response.Buffer = true;
        Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
        Response.Expires = 0;
        Response.CacheControl = "no-cache";
    %>
</head>
<body>
    <form id="form1" runat="server">
    <div class="aline_center" style="text-align: center">
        <div id='myDiv'>
            <div class="aline_center" style=" text-align:center;font-size: 40px; font-weight: bold; font-family: 黑体">
                出 库 单</div>
            <div style="margin: 10px;">
                <table class="aline_center" style="width: 17cm;">
                    <tr>
                        <td style="text-align: left; height: 20px;" colspan="4">
                            <b>出库单编号：</b><asp:Label ID="lbl_batchId" runat="server"></asp:Label>
                            
                            ,<strong>开单日期： </strong><asp:Label ID="lbl_date" runat="server"></asp:Label>
                           
                            
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; height: 20px;" colspan="4">
                            <b>项目名称</b>：<asp:Label ID="lbl_project_name" runat="server" Text=""></asp:Label>
                            ，<b>项目编号</b>：<asp:Label ID="lbl_proid" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; height: 20px;" colspan="4">
                            <b>到货地点</b>：<asp:Label ID="lbl_receive_address" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; height: 20px;" colspan="4">
                            <!--<b>接收人</b>：<asp:Label ID="lbl_receive_userName" runat="server"></asp:Label>
                            ，<b>接收人电话</b>：<asp:Label ID="lbl_receive_userPhone" runat="server"></asp:Label>-->
                        </td>
                    </tr>
                   
                    <tr>
                        <td style="text-align: left; height: 20px; text-align: center" colspan="4">
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                Width="100%" onrowdatabound="GridView1_RowDataBound" ShowFooter="True">
                                <Columns>
                                    <asp:BoundField HeaderText="物料描述" DataField="material" />
                                    <asp:TemplateField HeaderText="数量">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_nums" runat="server" Text='<%# Bind("out_storage_count") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox3" runat="server" 
                                                Text='<%# Bind("out_storage_count") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="单位" DataField="unit" />
                                    <asp:TemplateField HeaderText="单价">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_unprice" runat="server" Text='<%# Bind("unitPrice") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("unitPrice") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="金额">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_totalPrice" runat="server"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                             <asp:Label ID="lbl_totalAllPrice" runat="server"></asp:Label>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="out_storage_Estimate" HeaderText="出库时间" />
                                    <asp:BoundField DataField="sname" HeaderText="所属仓库" />
                                    <asp:BoundField DataField="spname" HeaderText="所属仓位" />
                                    
                                </Columns>
                                <RowStyle Height="20px" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; font-weight: bold; height: 20px;" colspan="4">
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                            领料部门：</td>
                        <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                            领料人签字：</td>
                         <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                             审核人：</td>
                         <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                             保管员：</td>
                    </tr>
                   
                    <tr>
                        <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                            开单人：<asp:Label ID="lbl_username" runat="server"></asp:Label>
                        </td>
                        <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                            白联：存根</td>
                         <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                             红联：保管联</td>
                         <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                             蓝联：记账联</td>
                    </tr>
                   
                    <tr>
                        <td style="text-align: left; font-weight: bold; height: 50px; width: 100px;">
                            黄联：领料联</td>
                        <td style="text-align: left; font-weight: bold; height: 50px; " colspan="3">
                            备注：此单据有效期30天，过期自动作废</td>
                    </tr>
                   
                </table>
            </div>
        </div>
        <div>
            <input type="button" id="bt" onclick="javascript: printpage('myDiv')" value=" 打  印 " />&nbsp;
        </div>
    </div>
    </form>
</body>
</html>
